#-------------------------------------------------
#
# Project created by QtCreator 2011-07-26T23:25:40
#
#-------------------------------------------------

QT       += core gui xml

release:DESTDIR = release/bin
debug:DESTDIR = debug/bin

TARGET = HoradrimBook
TEMPLATE = app

SOURCES += main.cpp\
#forms
        mainwindow.cpp \
    newcharacterdialog.cpp \
    aboutdialog.cpp \
#character related classes
    character/ctrait.cpp \
    character/cskill.cpp \
    character/crune.cpp \
    character/cclass.cpp \
    character/ccharacter.cpp \
    character/cability.cpp \
    customWidgets/editabilityitem.cpp \
    hbdatahandler.cpp \
    cexception.cpp

HEADERS  += \
#forms
mainwindow.h \
    newcharacterdialog.h \
    aboutdialog.h \
#character related classes
    character/ctrait.h \
    character/cskill.h \
    character/crune.h \
    character/cclass.h \
    character/ccharacter.h \
    character/cability.h \
    customWidgets/editabilityitem.h \
    hbdatahandler.h \
    cexception.h

FORMS    += mainwindow.ui \
    newcharacterdialog.ui \
    aboutdialog.ui

RESOURCES += \
    icons.qrc

OTHER_FILES += \
    locales/locale_en_US.ts \
    locales/locale_de_DE.ts \
    data/ \
    locales/locale_en_GB.ts

TRANSLATIONS += locales/locale_de_DE.ts
TRANSLATIONS += locales/locale_en_US.ts
TRANSLATIONS += locales/locale_en_GB.ts
#sourcelang = basic english

!isEmpty(TRANSLATIONS) {

    isEmpty(QMAKE_LRELEASE) {
        win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease.exe
        else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
    }

    isEmpty(TS_DIR):TS_DIR = locales

    TSQM.name = lrelease ${QMAKE_FILE_IN}
    TSQM.input = TRANSLATIONS
    TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
    TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
    TSQM.CONFIG = no_link
    QMAKE_EXTRA_COMPILERS += TSQM
    PRE_TARGETDEPS += compiler_TSQM_make_all
} else:message(No translation files in project)

mylocales.files = locales/*.qm
mylocales.path = $$DESTDIR/locales

mydata.files = data/*
mydata.path = $$DESTDIR/data
INSTALLS += mylocales
INSTALLS += mydata






